home *** CD-ROM | disk | FTP | other *** search
- Path: doc.ic.ac.uk!not-for-mail
- From: mdf@doc.ic.ac.uk (Martin Frost)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Working with LoadSeg()
- Date: 19 Feb 1996 15:15:33 -0000
- Organization: Dept. of Computing, Imperial College, University of London, UK.
- Distribution: world
- Message-ID: <4ga46l$e26@oak65.doc.ic.ac.uk>
- References: <DMs687.9w2@utcc.utoronto.ca>
- Reply-To: mdf@doc.ic.ac.uk (Martin Frost)
- NNTP-Posting-Host: oak65.doc.ic.ac.uk
- X-Newsreader: mxrn 6.18-23
-
-
- In article <DMs687.9w2@utcc.utoronto.ca>, normb@gpu.utcc.utoronto.ca writes:
-
- >> for(ResLib=(struct Resident *)BADDR(LibSeg);
- >
- >Getting ResLib this way allways fails for me.
- >Plus I Dont know why you have this in a for() loop.
- >
- >> ResLib->rt_MatchWord==0x4AFC && ResLib->rt_MatchPtr==ResLib;
- > ^^^^^^^^^^^
- > rt_MatchTag
- >> (UWORD *)ResLib++);
-
- I'm not sure, but I don't think that the romtag is obliged to start exactly
- 4 bytes in from the start of the hunk. The intention of this code was to
- search through the hunk until the romtag marker (0x4AFC) was found. However,
- it won't work unless you change the test to
-
- ResLib->rt_MatchWord!=0x4AFC || ResLib->rt_MatchTag!=ResLib;
-
- sorry; I've been forced to use a different language for my course where loops
- are arranged as untils instead of whiles, and it's messing up my C...
-
- >In looking at the includes (exec/resident.h) the comment beside
- >rt_MatchWord is /* word to match on (ILLEGAL) */ Does this mean
- >its illegal to use this field??
-
- No, it means that 0x4AFC is an instruction guaranteed to remain illegal on
- all 680x0 CPUs, for use as a breakpoint or similar.
-
- Martin
-